package com.tzbank.entity;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.annotations.Table;

import javax.persistence.Column;
import javax.persistence.Entity;
import java.io.Serializable;

@Data
@EqualsAndHashCode(callSuper = false)
@Entity(name = "mb_flow_optimize_relation")
@Table(appliesTo = "mb_flow_optimize_relation", comment = "规则引擎-流程规则优化关联表")
public class FlowOptimizeRelation extends BaseModel implements Serializable {

	private static final long serialVersionUID = -5511845823175311180L;

	/**
	 * 规则ID
	 */
	@ApiModelProperty(value = "规则ID")
	@Column(name = "optimize_id", columnDefinition = "int(11)  NOT NULL COMMENT '规则ID'")
	private String optimizeId;

	/**
	 * 流程规则ID的规则串
	 */
	@ApiModelProperty(value = "流程规则ID的规则串")
	@Column(name = "flow_rule_ids", columnDefinition = "varchar(50)  NOT NULL COMMENT '流程规则ID的规则串'")
	private String flowRuleIds;

	/**
	 * 流程ID
	 */
	@ApiModelProperty(value = " 流程ID")
	@Column(name = "flow_id", columnDefinition = "varchar(50)  NOT NULL COMMENT '流程ID'")
	private String flowId;

	/**
	 * 规则组合逻辑
	 */
	@ApiModelProperty(value = " 规则组合逻辑")
	@Column(name = "rule_logic", columnDefinition = "varchar(50)  DEFAULT NULL COMMENT '规则组合逻辑'")
	private String ruleLogic;

	/**
	 * 1：符合规则-执行；0；不符合规则-不执行
	 */
	@ApiModelProperty(value = "1：符合规则-执行；0：不符合规则-不执行")
	@Column(name = "action_flag", columnDefinition = "varchar(50)  NOT NULL  DEFAULT 1  COMMENT '1符合规则-执行 0不符合规则-不执行'")
	private String actionFlag;

	/**
	 * 需要去除的流程节点
	 */
	@ApiModelProperty(value = "需要去除的流程节点")
	@Column(name = "remove_flow_node", columnDefinition = "varchar(50)  NOT NULL  COMMENT '需要去除的流程节点'")
	private String removeFlowNode;

	/**
	 * 是否启用规则，1启用；0关闭
	 */
	@ApiModelProperty(value = "是否启用规则，1启用；0关闭")
	@Column(name = "status", columnDefinition = "varchar(10)  NOT NULL  DEFAULT 1  COMMENT '是否启用规则，1启用；0关闭'")
	private String status;

	/**
	 * 备注
	 */
	@ApiModelProperty(value = "备注")
	@Column(name = "remark", columnDefinition = "varchar(200) DEFAULT NULL COMMENT '备注'")
	private String remark;

}
